using System;
using System.Runtime.Serialization;

namespace InfiniTec
{
    /// <summary>
    /// Exception thrown when an invalid generic type was passed to a method.
    /// </summary>
    [Serializable]
    public sealed class TypeArgumentException : ArgumentException
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="TypeArgumentException"/> class.
        /// </summary>
        /// <param name="message">The message.</param>
        /// <param name="paramName">Name of the param.</param>
        public TypeArgumentException(string message, string paramName) : base(message, paramName)
        {
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="TypeArgumentException"/> class.
        /// </summary>
        /// <param name="message">The message.</param>
        /// <param name="paramName">Name of the param.</param>
        /// <param name="innerException">The inner exception.</param>
        public TypeArgumentException(string message, string paramName, Exception innerException) : base(message, paramName, innerException)
        {
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="TypeArgumentException"/> class.
        /// </summary>
        public TypeArgumentException() {}
	
        /// <summary>
        /// Initializes a new instance of the <see cref="TypeArgumentException"/> class.
        /// </summary>
        /// <param name="message">The message.</param>
        public TypeArgumentException(string message) : base(message) {}
		
        /// <summary>
        /// Initializes a new instance of the <see cref="TypeArgumentException"/> class.
        /// </summary>
        /// <param name="message">The message.</param>
        /// <param name="innerException">The inner exception.</param>
        public TypeArgumentException(string message, Exception innerException) : base(message, innerException) {}
	
        /// <summary>
        /// Initializes a new instance of the <see cref="TypeArgumentException"/> class.
        /// </summary>
        /// <param name="context">The <see cref="StreamingContext"/> to recreate the exception from.</param>
        /// <param name="info">The <see cref="SerializationInfo"/> to recreate the exception from.</param>
        private TypeArgumentException(SerializationInfo info, StreamingContext context): base(info, context) {}
    }
}
